<extend name="Base/common" />
<block name="style">
    <link rel="stylesheet" href="__UNIFY__/css/pages/page_log_reg_v1.css">
</block>
<block name="breadcrumbs">
    <div class="breadcrumbs">
        <div class="container">
            <h1 class="pull-left">修改密码</h1>
            <ul class="pull-right breadcrumb">
				<li><a href="{:U('Index/index')}">首页</a></li>
                <li class="active">修改密码</li>
            </ul>
        </div> 
    </div> 
</block>
<block name="header">
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-10">
	        <h2>修改密码</h2>
	        <ol class="breadcrumb">
	            <li>
	                <a href="{:U('index/index')}">首页</a>
	            </li>
	            <li class="active">
	                <strong>修改密码</strong>
	            </li>
	        </ol>
	    </div>
	</div>
</block>
<block name="body">
    <!--=== Content Part ===-->
    <div class="container content">		
    	<div class="row">
            <div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">
                <form  class="reg-page" action="__SELF__" method="post">
                    <div class="reg-header">            
                        <h2>修改密码</h2> 
                    </div> 
                    <div class="input-group margin-bottom-20">
                        <span class="input-group-addon"><i class="fa fa-user"></i></span>
                        <input required="" type="password" id="inputPassword"  class="form-control" placeholder="请输入原密码"  errormsg="密码为6-20位" nullmsg="请填写密码" datatype="*6-20" name="old">
                    </div>                    
                    <div class="input-group margin-bottom-20">
                        <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                        <input required="" type="password" id="inputPassword"  class="form-control" placeholder="请输入密码"  errormsg="密码为6-20位" nullmsg="请填写密码" datatype="*6-20" name="password">
                    </div> 
                    <div class="input-group margin-bottom-20">
                        <span class="input-group-addon"><i class="fa fa-question"></i></span>
                        <input required="" type="password" id="inputPassword" class="form-control" placeholder="请再次输入密码" recheck="password" errormsg="您两次输入的密码不一致" nullmsg="请填确认密码" datatype="*" name="repassword">
                    </div>
                     
                    <div class="controls Validform_checktip text-warning"></div>
                    <div class="row">
                        <div class="col-md-12">
                            <button class="btn-u pull-right" type="submit">保存</button>                        
                        </div>
                    </div>
                </form>            
            </div>
        </div> 
    </div> 
</block>
 

<block name="script">
	<script type="text/javascript">

    	$(document).ajaxStart(function(){$("button:submit").addClass("log-in").attr("disabled", true);})
	    		   .ajaxStop (function(){$("button:submit").removeClass("log-in").attr("disabled", false);});

    	$("form").submit(function(){ 
    		var self = $(this);
    		$.post(self.attr("action"), self.serialize(), success, "json");
    		return false;
    		function success(data){
    			if(data.status){
    				self.find(".Validform_checktip").text(data.info);
    				window.location.href = data.url;
    			} else {
    				self.find(".Validform_checktip").text(data.info);
    			}
    		}
    	});
	</script>
</block>
